package com.ssy.lingxi.platform.manage.api.feign.paas;

import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.platform.manage.api.hystrix.paas.SitePAASControllerFeignFallback;
import com.ssy.lingxi.platform.manage.api.model.dto.site.SitePAASDTO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @menu 站点 - （系统初始化）PAAS接口
 * @author fhj
 * @version 2.0.0
 * @date 2020/07/23
 */
@FeignClient(value = "platform-manage-service", fallback = SitePAASControllerFeignFallback.class)
public interface SitePAASControllerFeign {

    @ApiOperation(value = "新增")
    @PostMapping("/manage/paas/sitePAAS/add")
    Wrapper<?> add(@RequestBody SitePAASDTO dto);

    @ApiOperation(value = "修改")
    @PostMapping("/manage/paas/sitePAAS/update")
    Wrapper<?> update(@RequestBody SitePAASDTO dto);

    @ApiOperation(value = "修改状态")
    @PostMapping("/manage/paas/sitePAAS/update/state")
    Wrapper<?> updateState(@RequestBody SitePAASDTO dto);

    @ApiOperation(value = "删除")
    @PostMapping("/manage/paas/sitePAAS/delete")
    Wrapper<?> delete(@RequestBody SitePAASDTO dto);

    @GetMapping("/manage/paas/site/details")
    Wrapper<?> details(@RequestParam(value = "id") Long id);
}
